<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- 引入bootstrap -->
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/bootstrap.min.css">
<!-- 引入JQuery  bootstrap.js-->
<script src="<%=request.getContextPath()%>/js/bootstrap.min.js"></script>
<%--<script src="<%=request.getContextPath()%>/js/jquery.validate.min.js"></script>--%>
<script src="<%=request.getContextPath()%>/js/jquery-3.2.1.min.js"></script>
<html>
<head>
    <title>快马加鞭选择题页面</title>
</head>
<script type="text/javascript">
    function aa() {
        $.ajax({




        })

    }

</script>
<body>

<div class="form-group">
    游戏模式介绍:</br>
    “快马加鞭”是在5分钟内答对题目的数量。</br>
    <input name="id" value="${requestScope.question.id}" hidden="hidden"/>
    <label class="control-label">${requestScope.question.title}</label>
    <br>
    <label class="radio-inline">
        <input type="radio" name="answer" value="A" checked="checked">A.${question.attrA}
    </label>
    <label class="radio-inline">
        <input type="radio" name="answer" value="B">B.${question.attrB}
    </label>
    <label class="radio-inline">
        <input type="radio" name="answer" value="C" >C.${question.attrC}
    </label>
    <label class="radio-inline">
        <input type="radio" name="answer" value="D" >D.${question.attrD}
    </label>
</div>
<%--<button type="button" onclick="radioSubmit()">提交</button>--%>
   <form action="<%=request.getContextPath()%>/exam/challenge_kmjb" method="post">

       <input type="text" name="question_type" value="${question.question_type}" hidden="hidden">
       <button type="submit" class="btn btn-info">提交</button>

   </form>

<%--<a href="<%=request.getContextPath()%>/exam/challenge_kmjb?question_type=${question.question_type}"><span class="btn btn-info">提交</span> </a>--%>
<div id="countdown">还剩 5 分 00 秒</div>

<script>



    window.onload=function(){
        var countdown=document.getElementById("countdown");
        var time=300;//5分钟换算成300秒
        setInterval(function(){
            time=time-1;
            var minute=parseInt(time/60);
            var second=parseInt(time%60);
            countdown.innerHTML='还剩'+minute+'分'+second+'秒';
        },1000);
    };
    function go() {
        alert("竞赛时间到！！");
        document.location.href="<%=request.getContextPath()%>/exam/challenge";
    }
    setTimeout(go,300000);
</script>

</body>

</html>
